#include<stdio.h>
#include<sys/socket.h>
#include<netinet/in.h>
#include<unistd.h>
#include<arpa/inet.h>
#include<sys/select.h>
#include<mysql.h>
#include<string.h>

struct password
{
	char id[20];
	char passwd[20];
	int flag;
};

void master(int connectfd,struct password pw)
{
	int nflag=-1;	
	if(strcmp(pw.id,"Blz")==0&&strcmp(pw.passwd,"123")==0)
	{
		nflag=2;
	}
	send(connectfd,&nflag,sizeof(int),0);
	
}
